package com.gps.pe.exception;

/**
 * Exception for service layer
 * 
 * @author GPS
 *
 */
public class ServiceException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	/** An object that cause exception. */
	private Object object;

	/**
	 * Constructor.
	 * 
	 * @param object
	 *            object that caused exception
	 * @see Exception#Exception(String)
	 */
	public ServiceException(String message, Object object) {
		super(message);
		this.object = object;
	}

	/**
	 * Constructor.
	 * 
	 * @param object
	 *            object that caused exception
	 * @see Exception#Exception(String, Throwable)
	 */
	public ServiceException(String message, Object object, Throwable cause) {
		super(message, cause);
		this.object = object;
	}

	/**
	 * Gets object causing exception
	 * 
	 * @return object
	 */
	public Object getObject() {
		return object;
	}

}
